﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CompanyManageSystem.Model
{
    [Table("BaseElement")]
    public class BaseElement
    {
        /// <summary>
        /// 主键
        /// </summary>
        public Guid ID { get; set; }
        /// <summary>
        /// 名称
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 父键
        /// </summary>
        public Guid? ParentID { get; set; }
        /// <summary>
        /// 编码
        /// </summary>
        public string Code { get; set; }
        /// <summary>
        /// 类别(3:供应商分类 4:物料分类)
        /// </summary>
        public int Category { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime? CreateTime { get; set; }


        [NotMapped]
        public string CodeName { get { return "[" + Code + "]" + Name; } }
        [NotMapped]
        public bool IsChecked { get; set; }
    }
}
